]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-scroll-view-fade: Include outer bound of pixel on border
authorJonas Ådahl <jadahl@gmail.com>
Fri, 20 Oct 2017 04:10:58 +0000 (06:10 +0200)
committerJonas Ådahl <jadahl@gmail.com>
Fri, 1 Mar 2019 17:12:52 +0000 (17:12 +0000)
The fade shader will draw the fade effect up until the border pixel. If
we set the bottom right coordinate to the outer edge of the pixel we
might end up not drawing the fade effect on all of the pixels. This
could for example happen if one logical pixel (clutter stage pixel)
consists of more than one physical pixel.

https://bugzilla.gnome.org/show_bug.cgi?id=765011

src/st/st-scroll-view-fade.c

index 37f44c42ca8a7468416863d370b2c868b60ca9ab..3942cbcf0febe293f3d685d842f71a9b039b22b1 100644 (file)
@@ -110,8 +110,8 @@ st_scroll_view_fade_paint_target (ClutterOffscreenEffect *effect)
    */
   fade_area_topleft[0] = content_box.x1 + (verts[0].x - paint_box.x1);
   fade_area_topleft[1] = content_box.y1 + (verts[0].y - paint_box.y1);
-  fade_area_bottomright[0] = content_box.x2 + (verts[3].x - paint_box.x2);
-  fade_area_bottomright[1] = content_box.y2 + (verts[3].y - paint_box.y2);
+  fade_area_bottomright[0] = content_box.x2 + (verts[3].x - paint_box.x2) + 1;
+  fade_area_bottomright[1] = content_box.y2 + (verts[3].y - paint_box.y2) + 1;
 
   g_object_get (ST_SCROLL_VIEW (self->actor),
                 "hscrollbar-visible", &h_scroll_visible,